<?php
/**
 * 用户信息验证类
 * User: 16
 * Date: 2018/1/19
 * Time: 21:58
 */
namespace app\api\validate;

use think\Validate;

class User extends Validate
{
    protected $rule =   [
        'username'  => 'require|max:25',
        'psw'   => 'require',
    ];

    protected $message  =   [
        'username.require' => '用户名不能为空',
        'psw.require'     => '密码不能为空',
        'username.max'   => '用户名不得超过25个字符',
    ];

}